import sys,os
from dotenv import load_dotenv
from datetime import timedelta
load_dotenv()

ALIYUN_ACCESS_KEY_ID=os.getenv('ALIYUN_ACCESS_KEY_ID')
ALIYUN_ACCESS_KEY_SECRET=os.getenv('ALIYUN_ACCESS_KEY_SECRET')
ALIYUN_OSS_ENDPOINT=os.getenv('ALIYUN_OSS_ENDPOINT','oss-cn-hangzhou.aliyuncs.com')
ALIYUN_OSS_BUCKET=os.getenv('ALIYUN_OSS_BUCKET','user-api-ym')
ALIYUN_OSS_REGION=os.getenv('ALIYUN_OSS_REGION','cn-hangzhou')
ALIYUN_OSS_DOMAIN=f"https://{ALIYUN_OSS_BUCKET}.{ALIYUN_OSS_ENDPOINT}/"

REDIS_HOST=os.getenv('REDIS_HOST','127.0.0.1')
REDIS_PORT=int(os.getenv('REDIS_PORT','6379'))
REDIS_DB=int(os.getenv('REDIS_DB','0'))
REDIS_PASSWORD=os.getenv('REDIS_PASSWORD','your password')
REDIS_TIMEOUT=float(os.getenv('REDIS_TIMEOUT','5'))


JWT_SECRET_KEY=os.getenv('JWT_SECRET_KEY','a_secure_secret_key_for_testing_123456789')
JWT_ACCESS_TOKEN_EXPIRES=timedelta(seconds=int(os.getenv('JWT_ACCESS_TOKEN_EXPIRES','3600')))
JWT_REFRESH_TOKEN_EXPIRES=timedelta(seconds=int(os.getenv('JWT_REFRESH_TOKEN_EXPIRES','604800')))

CONSUL_HOST=os.getenv('CONSUL_HOST','127.0.0.1')
CONSUL_HTTP_PORT=int(os.getenv('CONSUL_HTTP_PORT','8500'))
CONSUL_DNS_PORT=int(os.getenv('CONSUL_DNS_PORT','8600'))
CONSUL_DATACENTER=os.getenv('CONSUL_DATACENTER','dc1')

SERVER_PORT=int(os.getenv('SERVER_PORT','8000'))